package vo;

import java.util.List;

/**
 * Created by Lykos on 15/11/16.
 */
public class Page {
    private int pageSize =20;
    private int currentPage = 1;
    private int totalSize;
    private List results;

    public int getPageSize() {
        return pageSize;
    }

    public int getTotalPage(){
        if(totalSize%pageSize==0){
            return totalSize/pageSize;
        }
        return totalSize/pageSize+1;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public List getResults() {
        return results;
    }

    public void setResults(List results) {
        this.results = results;
    }

    public int getTotalSize() {
        return totalSize;
    }

    public void setTotalSize(int totalSize) {
        this.totalSize = totalSize;
    }
}
